﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;

namespace CommData
{
    /// <summary>
    /// 消息状态
    /// </summary>
    public enum MessageStatus
    {
        /// <summary>
        /// 错误，-1
        /// </summary>
        [Description("失败")]
        Error = -1,

        /// <summary>
        /// 成功，0
        /// </summary>
        [Description("成功")]
        Success = 0,

        [Description("用户名或密码无效")]
        Invalid_Username_password = 1,

        [Description("用户已存在")]
        User_Exist_Error = 2,

        [Description("用户不存在")]
        User_Not_Exist_Error = 3,

        [Description("订单不存在")]
        Order_Not_Exist_Error = 4,

        [Description("参数不正确")]
        Params_Not_Right = 5,

        [Description("查不到数据")]
        Data_UnAble = 6,

        [Description("退菜数量超出最大值")]
        Data_Beyond = 7,

        [Description("异常")]
        Exception = 100,

        /// <summary>
        /// 内容解析错误，101
        /// </summary>
        [Description("Analysis_Error")]
        Analysis_Error = 101,

        /// <summary>
        /// 请求长度与请求实际包长度不符，102
        /// </summary>
        [Description("Packet_Length_Error")]
        Packet_Length_Error = 102,

        [Description("数据库添加数据失败")]
        DB_Add_Failed = 103,

        [Description("数据库更新数据失败")]
        DB_Update_Failed = 104,

        [Description("数据库删除数据失败")]
        DB_Del_Failed = 105,

        [Description("数据库查询失败")]
        DB_Query_Failed = 106,
    }
}